﻿

namespace Wpf2.Models
{
    public class OrderForPrinter : Products
    {
        public OrderForPrinter(Products pro, PaymentInfomation payment, Customer cus)
        { 
            ProductId = pro.ProductId;
            ProductName = pro.ProductName;
            ProductDescription = pro.ProductDescription;
            InventoryCount = pro.InventoryCount;
            CostPrice = pro.CostPrice;
            UnitName = pro.UnitName;
            CatalogName = pro.CatalogName;
            TotalOutPayment = pro.TotalOutPayment;

            CusName = cus.CusName;
            Phone = cus.Phone;
            Address = cus.Address;
            IdCus = cus.IdCus;

            OldDebts = payment.OldDebts;
            SumOut = payment.SumOut;
            Remain = payment.Remain;
            PrePaid = payment.PrePaid;
            TotalAllPayment = payment.TotalPayment;
        }


        #region -- Customer ---
        private int _idCus;
        private string _phone;
        private string _cusName;
        private string _address;

        public string Address
        {
            get { return _address; }
            set { _address = value;}
        }

        public int IdCus
        {
            get { return _idCus; }
            set { _idCus = value;}
        }


        public string CusName
        {
            get { return _cusName; }
            set { _cusName = value; }
        }

        public string Phone
        {
            get { return _phone; }
            set { _phone = value;}
        }
        #endregion 

        #region --- payment ---
        decimal _oldDebts;
        private decimal _sumOut;
        private decimal _remain;
        private decimal _prePaid;
        private decimal _totalPayment;

        public decimal OldDebts
        {
            get { return _oldDebts; }
            set { _oldDebts = value;  }
        }


        public decimal PrePaid
        {
            get { return _prePaid; }
            set { _prePaid = value; }
        }


        public decimal SumOut
        {
            get { return _sumOut; }
            set { _sumOut = value;}
        }

        // = tong toa + no cu
        public decimal TotalAllPayment
        {
            get { return _totalPayment; }
            set { _totalPayment = value;}
        }

        // = tong cong - gui trc
        public decimal Remain
        {
            get { return _remain; }
            set { _remain = value;}
        }
        #endregion
    }
}
